package com.yidu.drug.action;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yidu.drug.common.Page;
import com.yidu.drug.common.Tools;
import com.yidu.drug.dao.PurchaseOrderModelMapper;
import com.yidu.drug.dao.RepertoryModelMapper;
import com.yidu.drug.model.DrugManagerModel;
import com.yidu.drug.model.QtSumModel;
import com.yidu.drug.model.QualityTestingModel;
import com.yidu.drug.model.RepertoryModel;
import com.yidu.drug.service.QtSumModelService;

@Controller
@RequestMapping("/qtSumModel")
public class QtSumModelAction {
	@Resource
	private QtSumModelService qtSumModelService;
	
	@Resource
	private PurchaseOrderModelMapper purchaseOrderModelDao;
	
	@Resource
	private RepertoryModelMapper repertoryDao;
	
	
	/**
	 * 查询所有数据
	 * @throws UnsupportedEncodingException 
	 */
	@RequestMapping("/findAll")
	@ResponseBody
	public Map<String,Object> findAll(QtSumModel qtSum,HttpSession session){
		//得到用户对象
		DrugManagerModel us = (DrugManagerModel) session.getAttribute("manager");
		System.out.println(us.getFilId()+"分公司ID==============================》");
		qtSum.setFilId(us.getFilId());
		return qtSumModelService.findAll(qtSum);
	}
}
